home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-2.iso / os2 / rsynth1.zip / config.sub < prev    next >
Text File  |  1994-10-31  |  19KB  |  942 lines

  1. #!/bin/sh
  2. # Configuration validation subroutine script, version 1.1.
  3. #   Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  4. # This file is (in principle) common to ALL GNU software.
  5. # The presence of a machine in this file suggests that SOME GNU software
  6. # can handle that machine.  It does not imply ALL GNU software can. 
  7.  
  8. #This file is free software; you can redistribute it and/or modify
  9. #it under the terms of the GNU General Public License as published by
  10. #the Free Software Foundation; either version 2 of the License, or
  11. #(at your option) any later version.
  12.  
  13. #This program is distributed in the hope that it will be useful,
  14. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. #GNU General Public License for more details.
  17.  
  18. #You should have received a copy of the GNU General Public License
  19. #along with this program; if not, write to the Free Software
  20. #Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22.  
  23. # Configuration subroutine to validate and canonicalize a configuration type.
  24. # Supply the specified configuration type as an argument.
  25. # If it is invalid, we print an error message on stderr and exit with code 1.
  26. # Otherwise, we print the canonical config type on stdout and succeed.
  27.  
  28. # This file is supposed to be the same for all GNU packages
  29. # and recognize all the CPU types, system types and aliases
  30. # that are meaningful with *any* GNU software.
  31. # Each package is responsible for reporting which valid configurations
  32. # it does not support.  The user should be able to distinguish
  33. # a failure to support a valid configuration from a meaningless
  34. # configuration.
  35.  
  36. # The goal of this file is to map all the various variations of a given
  37. # machine specification into a single specification in the form:
  38. #    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  39. # It is wrong to echo any other type of specification.
  40.  
  41. if [ x$1 = x ]
  42. then
  43.     echo Configuration name missing. 1>&2
  44.     echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
  45.     echo "or     $0 ALIAS" 1>&2
  46.     echo where ALIAS is a recognized configuration type. 1>&2
  47.     exit 1
  48. fi
  49.  
  50. # First pass through any local machine types.
  51. case $1 in
  52.     *local*)
  53.         echo $1
  54.         exit 0
  55.         ;;
  56.     *)
  57.     ;;
  58. esac
  59.  
  60. # Separate what the user gave into CPU-COMPANY and OS (if any).
  61. basic_machine=`echo $1 | sed 's/-[^-]*$//'`
  62. if [ $basic_machine != $1 ]
  63. then os=`echo $1 | sed 's/.*-/-/'`
  64. else os=; fi
  65.  
  66. ### Let's recognize common machines as not being operating systems so
  67. ### that things like config.sub decstation-3100 work.  We also
  68. ### recognize some manufacturers as not being operating systems, so we
  69. ### can provide default operating systems below.
  70. case $os in
  71.     -sun*os*)
  72.         # Prevent following clause from handling this invalid input.
  73.         ;;
  74.     -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
  75.     -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
  76.     -unicom* | -ibm* | -next* | -hp | -isi* | -apollo | -altos* | \
  77.     -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  78.     -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  79.     -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
  80.     -sim | -cisco)                        # CYGNUS LOCAL
  81.         os=
  82.         basic_machine=$1
  83.         ;;
  84.     -scout)                        # CYGNUS LOCAL
  85.         ;;
  86.     -wrs)                        # CYGNUS LOCAL
  87.         os=vxworks
  88.         basic_machine=$1
  89.         ;;
  90.     -unixware)                    # CYGNUS LOCAL
  91.         os=-sysv4
  92.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  93.         ;;
  94.     -hiux*)
  95.         os=-hiuxwe2
  96.         ;;
  97.     -sco4)
  98.         os=-sco3.2v4
  99.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  100.         ;;
  101.     -sco3.2.[4-9]*)
  102.         os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  103.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  104.         ;;
  105.     -sco3.2v[4-9]*)
  106.         # Don't forget version if it is 3.2v4 or newer.
  107.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  108.         ;;
  109.     -sco*)
  110.         os=-sco3.2v2
  111.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  112.         ;;
  113.     -isc)
  114.         os=-isc2.2
  115.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  116.         ;;
  117.     -clix*)
  118.         basic_machine=clipper-intergraph
  119.         ;;
  120.     -isc*)
  121.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  122.         ;;
  123.     -lynx)
  124.         os=-lynxos
  125.         ;;
  126.     -os9k)
  127.         os=-os9k
  128.         ;;
  129.     -os9)
  130.         os=-os9
  131.         ;;
  132. esac
  133.  
  134. # Decode aliases for certain CPU-COMPANY combinations.
  135. case $basic_machine in
  136.     # Recognize the basic CPU types without company name.
  137.     # Some are omitted here because they have special meanings below.
  138.     tahoe | i[34]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \
  139.         | tron | a29k | 580 | i960 | hppa1.0 | hppa1.1 \
  140.         | alpha | we32k | ns16k | clipper | sparclite | i370 \
  141.         | powerpc \
  142.         | h8300 | h8300h | sh \
  143.         | m88110 | sparc | m680[01234]0 | m683?2 | z8k | v70 \
  144.         | h8500 | mips64 | mipsel | mips64el) # CYGNUS LOCAL
  145.         basic_machine=$basic_machine-unknown
  146.         ;;
  147.     # Object if more than one company name word.
  148.     *-*-*)
  149.         echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  150.         exit 1
  151.         ;;
  152.     # Recognize the basic CPU types with company name.
  153.     vax-* | tahoe-* | i[34]86-* | i860-* | m68k-* | m68000-* | m88k-* \
  154.           | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
  155.           | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
  156.           | none-* | 580-* | cray2-* | i960-* | xmp-* | ymp-* \
  157.           | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
  158.           | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
  159.           | powerpc \
  160.           | h8300-* | h8300h-* | sh-* \
  161.           | m88110-* | m680[01234]0-* | m683?2-* | z8k-* | h8500-* \
  162.           | mips64-* | mipsel-* | mips64el-*) # CYGNUS LOCAL
  163.         ;;
  164.     # Recognize the various machine names and aliases which stand
  165.     # for a CPU type and a company and sometimes even an OS.
  166.  
  167.     mips3-*)                    # CYGNUS LOCAL
  168.         basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  169.         ;;
  170.     mips3)                        # CYGNUS LOCAL
  171.         basic_machine=mips64-unknown
  172.         ;;
  173.     dpx20 | dpx20-*)                # CYGNUS LOCAL
  174.         basic_machine=rs6000-bull
  175.         os=-bosx
  176.         ;;
  177.     unixware)                    # CYGNUS LOCAL
  178.         os=-sysv4
  179.         basic_machine=i386-unknown
  180.         ;;
  181.     vaxv)
  182.         basic_machine=vax-dec
  183.         os=-sysv
  184.         ;;
  185.     vms)
  186.         basic_machine=vax-dec
  187.         os=-vms
  188.         ;;
  189.     i370-ibm* | ibm*)
  190.         basic_machine=i370-ibm
  191.         os=-mvs
  192.         ;;
  193.     i386mach)                    # CYGNUS LOCAL
  194.         basic_machine=i386-mach
  195.         os=-mach
  196.         ;;
  197.     i[34]86v32)
  198.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  199.         os=-sysv32
  200.         ;;
  201.     i[34]86v4*)
  202.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  203.         os=-sysv4
  204.         ;;
  205.     i[34]86v)
  206.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  207.         os=-sysv
  208.         ;;
  209.     i[34]86sol2)
  210.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  211.         os=-solaris2
  212.         ;;
  213.     vsta | i386-vsta)                # CYGNUS LOCAL
  214.         basic_machine=i386-unknown
  215.         os=-vsta
  216.         ;;
  217.     go32 | i386-go32)                # CYGNUS LOCAL
  218.         basic_machine=i386-unknown
  219.         os=-go32
  220.         ;;
  221.     i386-linux* | linux)                # CYGNUS LOCAL
  222.         basic_machine=i386-unknown
  223.         os=-linux
  224.         ;;
  225.     i386-linux*coff | linuxcoff)            # CYGNUS LOCAL
  226.         basic_machine=i386-unknown
  227.         os=-linuxcoff
  228.         ;;
  229.     i386-linux*elf | linuxelf)            # CYGNUS LOCAL
  230.         basic_machine=i386-unknown
  231.         os=-linuxelf
  232.         ;;
  233.     386bsd)                        # CYGNUS LOCAL
  234.         basic_machine=i386-unknown
  235.         os=-bsd
  236.         ;;
  237.     netbsd386)
  238.         basic_machine=i386-unknown        # CYGNUS LOCAL
  239.         os=-netbsd
  240.         ;;
  241.     spur)
  242.         basic_machine=spur-unknown
  243.         ;;
  244.     paragon)
  245.         basic_machine=i860-intel
  246.         os=-osf
  247.         ;;
  248.     alliant | fx80)
  249.         basic_machine=fx80-alliant
  250.         ;;
  251.     convex-c1)
  252.         basic_machine=c1-convex
  253.         os=-bsd
  254.         ;;
  255.     convex-c2)
  256.         basic_machine=c2-convex
  257.         os=-bsd
  258.         ;;
  259.     convex-c32)
  260.         basic_machine=c32-convex
  261.         os=-bsd
  262.         ;;
  263.     convex-c34)
  264.         basic_machine=c34-convex
  265.         os=-bsd
  266.         ;;
  267.     convex-c38)
  268.         basic_machine=c38-convex
  269.         os=-bsd
  270.         ;;
  271.     m88k-omron*)
  272.         basic_machine=m88k-omron
  273.         ;;
  274.     merlin)
  275.         basic_machine=ns32k-utek
  276.         os=-sysv
  277.         ;;
  278.     crds | unos)
  279.         basic_machine=m68k-crds
  280.         ;;
  281.     elxsi)
  282.         basic_machine=elxsi-elxsi
  283.         os=-bsd
  284.         ;;
  285.     encore | umax | mmax)
  286.         basic_machine=ns32k-encore
  287.         ;;
  288.     genix)
  289.         basic_machine=ns32k-ns
  290.         ;;
  291.     iris | iris4d | \
  292.     iris3 | iris4)                    # CYGNUS LOCAL
  293.         basic_machine=mips-sgi
  294.         case $os in
  295.             -irix*)
  296.             ;;
  297.             *)
  298.             os=-irix4
  299.             ;;
  300.         esac
  301.         ;;
  302.     news | news700 | news800 | news900)
  303.         basic_machine=m68k-sony
  304.         os=-newsos
  305.         ;;
  306.     3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  307.         basic_machine=m68000-att
  308.         ;;
  309.     3b*)
  310.         basic_machine=we32k-att
  311.         ;;
  312.     delta | 3300 | motorola-3300 | motorola-delta \
  313.           | 3300-motorola | delta-motorola)
  314.         basic_machine=m68k-motorola
  315.         ;;
  316.     balance)
  317.         basic_machine=ns32k-sequent
  318.         os=-dynix
  319.         ;;
  320.         pc532)
  321.         basic_machine=ns32k-pc532
  322.         ;;
  323.     symmetry)
  324.         basic_machine=i386-sequent
  325.         os=-dynix
  326.         ;;
  327.     sun2)
  328.         basic_machine=m68000-sun
  329.         ;;
  330.     sun2os3)
  331.         basic_machine=m68000-sun
  332.         os=-sunos3
  333.         ;;
  334.     sun2os4)
  335.         basic_machine=m68000-sun
  336.         os=-sunos4
  337.         ;;
  338.     sun3os3)
  339.         basic_machine=m68k-sun
  340.         os=-sunos3
  341.         ;;
  342.     sun3os4)
  343.         basic_machine=m68k-sun
  344.         os=-sunos4
  345.         ;;
  346.     sun4os3)
  347.         basic_machine=sparc-sun
  348.         os=-sunos3
  349.         ;;
  350.     sun4os4)
  351.         basic_machine=sparc-sun
  352.         os=-sunos4
  353.         ;;
  354.     sun4sol2)                    # CYGNUS LOCAL
  355.         basic_machine=sparc-sun
  356.         os=-solaris2
  357.         ;;
  358.     z8ksim)                        # CYGNUS LOCAL
  359.         basic_machine=z8k-zilog
  360.         os=-sim
  361.         ;;
  362.     z8k)                        # CYGNUS LOCAL
  363.         basic_machine=z8k-zilog
  364.         ;;
  365.     sun3)
  366.         basic_machine=m68k-sun
  367.         ;;
  368.     sun4)
  369.         basic_machine=sparc-sun
  370.         ;;
  371.     msdos)                        # CYGNUS LOCAL
  372.         basic_machine=i386-unknown    
  373.         os=-msdos
  374.         ;;
  375.     pbd)
  376.         basic_machine=sparc-tti
  377.         ;;
  378.     pbb)
  379.         basic_machine=m68k-tti
  380.         ;;
  381.     sun386 | sun386i | roadrunner)
  382.         basic_machine=i386-sun
  383.         ;;
  384.     ps2)
  385.         basic_machine=i386-ibm
  386.         ;;
  387.     fx2800)
  388.         basic_machine=i860-alliant
  389.         ;;
  390.     next)
  391.         basic_machine=m68k-next
  392.         os=-bsd
  393.         ;;
  394.     amiga)
  395.         basic_machine=m68k-cbm
  396.         ;;
  397.     amigados)
  398.         basic_machine=m68k-cbm
  399.         os=-amigados
  400.         ;;
  401.     amigaunix | amix)
  402.         basic_machine=m68k-cbm
  403.         os=-sysv4
  404.         ;;
  405.     hp9k3[2-9][0-9])
  406.         basic_machine=m68k-hp
  407.         ;;
  408.     hp9k31[0-9] | hp9k2[0-9][0-9])
  409.         basic_machine=m68000-hp
  410.         ;;
  411.     hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
  412.         basic_machine=hppa1.1-hp
  413.         ;;
  414.     hp9k8[0-9][0-9] | hp8[0-9][0-9])
  415.         basic_machine=hppa1.0-hp
  416.         ;;
  417.     h3050r* | hppahitachi)
  418.         basic_machine=hppa1.1-hitachi
  419.         ;;
  420.     isi68 | isi)
  421.         basic_machine=m68k-isi
  422.         os=-sysv
  423.         ;;
  424.     apollo68)
  425.         basic_machine=m68k-apollo
  426.         os=-sysv
  427.         ;;
  428.     apollo68bsd)                    # CYGNUS LOCAL
  429.         basic_machine=m68k-apollo
  430.         os=-bsd
  431.         ;;
  432.     altos | altos3068)
  433.         basic_machine=m68k-altos
  434.         ;;
  435.     miniframe)
  436.         basic_machine=m68010-convergent
  437.         ;;
  438.     tower | tower-32)
  439.         basic_machine=m68k-ncr
  440.         ;;
  441.     news-3600 | risc-news)
  442.         basic_machine=mips-sony
  443.         os=-newsos
  444.         ;;
  445.     st2000)                        # CYGNUS LOCAL
  446.         basic_machine=m68k-tandem
  447.         ;;
  448.         m6*bug)                                           # CYGNUS LOCAL
  449.                 basic_machine=m68k-bug
  450.         os=-coff
  451.                 ;;
  452.         rom68k)                                         # CYGNUS LOCAL
  453.                 basic_machine=m68k-rom68k
  454.         os=-coff
  455.                 ;;
  456.         monitor)                                         # CYGNUS LOCAL
  457.                 basic_machine=m68k-rom68k
  458.         os=-coff
  459.                 ;;
  460.     decstation | decstation-3100 | pmax | pmin | dec3100 | decstatn)
  461.         basic_machine=mips-dec
  462.         ;;
  463.     magnum | m3230)
  464.         basic_machine=mips-mips
  465.         os=-sysv
  466.         ;;
  467.     gmicro)
  468.         basic_machine=tron-gmicro
  469.         os=-sysv
  470.         ;;
  471.     rtpc | rtpc-*)
  472.         basic_machine=romp-ibm
  473.         ;;
  474.     am29k)
  475.         basic_machine=a29k-none
  476.         os=-bsd
  477.         ;;
  478.     amdahl)
  479.         basic_machine=580-amdahl
  480.         os=-sysv
  481.         ;;
  482.     stratus)                    # CYGNUS LOCAL
  483.         basic_machine=i860-stratus
  484.         os=-sysv4
  485.         ;;
  486.     cray | ymp)
  487.         basic_machine=ymp-cray
  488.         os=-unicos
  489.         ;;
  490.     cray2)
  491.         basic_machine=cray2-cray
  492.         os=-unicos
  493.         ;;
  494.     xmp)
  495.         basic_machine=xmp-cray
  496.         os=-unicos
  497.         ;;
  498.     delta88)
  499.         basic_machine=m88k-motorola
  500.         os=-sysv3
  501.         ;;
  502.     dpx2* | dpx2*-bull)
  503.         basic_machine=m68k-bull
  504.         os=-sysv3
  505.         ;;
  506.     ebmon29k)
  507.         basic_machine=a29k-amd
  508.         os=-ebmon
  509.         ;;
  510.     h8300hms)                    # CYGNUS LOCAL
  511.         basic_machine=h8300-hitachi
  512.         os=-hms
  513.         ;;
  514.     sh*)                        # CYGNUS LOCAL
  515.         basic_machine=sh-hitachi
  516.         os=-hms
  517.         ;;
  518.  
  519.     h8500hms)                    # CYGNUS LOCAL
  520.         basic_machine=h8500-hitachi
  521.         os=-hms
  522.         ;;
  523.     h8300xray)                    # CYGNUS LOCAL
  524.         basic_machine=h8300-hitachi
  525.         os=-xray
  526.         ;;
  527.     h8300hds)
  528.         basic_machine=h8300-hitachi
  529.         os=-hds
  530.         ;;
  531.     udi29k)                        # CYGNUS LOCAL
  532.         basic_machine=a29k-amd
  533.         os=-udi
  534.         ;;
  535.     a29khif)                    # CYGNUS LOCAL
  536.         basic_machine=a29k-amd
  537.         os=-udi
  538.         ;;
  539.     sa29200)                    # CYGNUS LOCAL
  540.         basic_machine=a29k-amd
  541.         os=-udi
  542.         ;;
  543.     harris)
  544.         basic_machine=m88k-harris
  545.         os=-sysv3
  546.         ;;
  547.     hp300bsd)
  548.         basic_machine=m68k-hp
  549.         os=-bsd
  550.         ;;
  551.     hp300hpux)
  552.         basic_machine=m68k-hp
  553.         os=-hpux
  554.         ;;
  555.     hppaosf)
  556.         basic_machine=hppa1.1-hp
  557.         os=-osf
  558.         ;;
  559.     ncr3000)
  560.         basic_machine=i486-ncr
  561.         os=-sysv4
  562.         ;;
  563.     necv70)                        # CYGNUS LOCAL
  564.         basic_machine=v70-nec
  565.         os=-sysv
  566.         ;;
  567.     news1000)
  568.         basic_machine=m68030-sony
  569.         os=-newsos
  570.         ;;
  571.     nindy960)
  572.         basic_machine=i960-intel
  573.         os=-nindy
  574.         ;;
  575.     pn)
  576.         basic_machine=pn-gould
  577.         ;;
  578.     np1)
  579.         basic_machine=np1-gould
  580.         ;;
  581.     ultra3)
  582.         basic_machine=a29k-nyu
  583.         os=-sym1
  584.         ;;
  585.     vxworks960)
  586.         basic_machine=i960-wrs
  587.         os=-vxworks
  588.         ;;
  589.     vxworks68)
  590.         basic_machine=m68k-wrs
  591.         os=-vxworks
  592.         ;;
  593.     es1800 | OSE68k | ose68k | ose | OSE)        # CYGNUS LOCAL
  594.         basic_machine=m68k-ericsson
  595.         os=-ose
  596.         ;;
  597.     OSE68000 | ose68000)                # CYGNUS LOCAL
  598.         basic_machine=m68000-ericsson
  599.         os=-ose
  600.         ;;
  601.     os68k)                        # CYGNUS LOCAL
  602.         basic_machine=m68k-none
  603.         os=-os68k
  604.         ;;
  605.     sparclite-wrs)                    # CYGNUS LOCAL
  606.         basic_machine=sparclite-wrs
  607.         os=-vxworks
  608.         ;;
  609.     sparcfrw)                    # CYGNUS LOCAL
  610.         basic_machine=sparcfrw-sun
  611.         os=-sunos4
  612.         ;;
  613.     sparcfrwcompat)                    # CYGNUS LOCAL
  614.         basic_machine=sparcfrwcompat-sun
  615.         os=-sunos4
  616.         ;;
  617.     sparclitefrw)                    # CYGNUS LOCAL
  618.         basic_machine=sparclitefrw-fujitsu
  619.         os=-none
  620.         ;;
  621.     sparclitefrwcompat)                # CYGNUS LOCAL
  622.         basic_machine=sparclitefrwcompat-fujitsu
  623.         os=-none
  624.         ;;
  625.     adobe68k)                    # CYGNUS LOCAL
  626.         basic_machine=m68010-adobe
  627.         os=-scout
  628.         ;;
  629.  
  630.         xps | xps100)
  631.         basic_machine=xps100-honeywell
  632.         ;;
  633.     none)
  634.         basic_machine=none-none
  635.         os=-none
  636.         ;;
  637.  
  638. # Here we handle the default manufacturer of certain CPU types.  It is in
  639. # some cases the only manufacturer, in others, it is the most popular.
  640.     mips)
  641.         basic_machine=mips-mips
  642.         ;;
  643.     romp)
  644.         basic_machine=romp-ibm
  645.         ;;
  646.     rs6000)
  647.         basic_machine=rs6000-ibm
  648.         ;;
  649.     vax)
  650.         basic_machine=vax-dec
  651.         ;;
  652.     we32k)
  653.         basic_machine=we32k-att
  654.         ;;
  655.     sparc)
  656.         basic_machine=sparc-sun
  657.         ;;
  658.         cydra)
  659.         basic_machine=cydra-cydrome
  660.         ;;
  661.     orion)
  662.         basic_machine=orion-highlevel
  663.         ;;
  664.     orion105)
  665.         basic_machine=clipper-highlevel
  666.         ;;
  667.     *)
  668.         echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  669.         exit 1
  670.         ;;
  671. esac
  672.  
  673. # Here we canonicalize certain aliases for manufacturers.
  674. case $basic_machine in
  675.     *-digital*)
  676.         basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  677.         ;;
  678.     *-commodore*)
  679.         basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  680.         ;;
  681.     *)
  682.         ;;
  683. esac
  684.  
  685. # Decode manufacturer-specific aliases for certain operating systems.
  686.  
  687. if [ x"$os" != x"" ]
  688. then
  689. case $os in
  690.     # -solaris* is a basic system type, with this one exception.
  691.     -solaris1 | -solaris1.*)
  692.         os=`echo $os | sed -e 's|solaris1|sunos4|'`
  693.         ;;
  694.     -solaris)
  695.         os=-solaris2
  696.         ;;
  697.     # First accept the basic system types.
  698.     # The portable systems comes first.
  699.     # Each alternative must end in a *, to match a version number.
  700.     # -sysv* is not here because it comes later, after sysvr4.
  701.     -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  702.           | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]* | -hpux* \
  703.           | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  704.           | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
  705.           | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
  706.           | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
  707.           | -hiux* | -386bsd* | -netbsd* | -riscix* | -lynxos* \
  708.           | -go32 | -vsta | -sim | -es1800* | -udi | -hms* | -xray | -hds* \
  709.           | -os68k* | -none* | -v88r* | -aout* | -coff | -elf* | -bosx* \
  710.           | -abug | -ecoff* | -netware* | -os9* )
  711.                 # The last three lines above are CYGNUS LOCAL
  712.     ;;
  713.     -sunos5*)
  714.         os=`echo $os | sed -e 's|sunos5|solaris2|'`
  715.         ;;
  716.     -sunos6*)
  717.         os=`echo $os | sed -e 's|sunos6|solaris3|'`
  718.         ;;
  719.     -osfrose*)
  720.         os=-osfrose
  721.         ;;
  722.     -osf*)
  723.         os=-osf
  724.         ;;
  725.     -utek*)
  726.         os=-bsd
  727.         ;;
  728.     -dynix*)
  729.         os=-bsd
  730.         ;;
  731.     -acis*)
  732.         os=-aos
  733.         ;;
  734.     -386bsd)                    # CYGNUS LOCAL
  735.         os=-bsd
  736.         ;;
  737.     -ctix* | -uts*)
  738.         os=-sysv
  739.         ;;
  740.     -triton*)
  741.         os=-sysv3
  742.         ;;
  743.     -oss*)
  744.         os=-sysv3
  745.         ;;
  746.     -svr4)
  747.         os=-sysv4
  748.         ;;
  749.     -unixware)
  750.         os=-sysv4
  751.         ;;
  752.     -svr3)
  753.         os=-sysv3
  754.         ;;
  755.     -sysvr4)
  756.         os=-sysv4
  757.         ;;
  758.     # This must come after -sysvr4.
  759.     -sysv*)
  760.         ;;
  761.     -ose*)                        # CYGNUS LOCAL
  762.         os=-ose
  763.         ;;
  764.     -es1800*)                    # CYGNUS LOCAL
  765.         os=-ose
  766.         ;;
  767.     -xenix)
  768.         os=-xenix
  769.         ;;
  770.     -none)
  771.         ;;
  772.     *)
  773.         # Get rid of the `-' at the beginning of $os.
  774.         os=`echo $1 | sed 's/[^-]*-//'`
  775.         echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  776.         exit 1
  777.         ;;
  778. esac
  779. else
  780.  
  781. # Here we handle the default operating systems that come with various machines.
  782. # The value should be what the vendor currently ships out the door with their
  783. # machine or put another way, the most popular os provided with the machine.
  784.  
  785. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  786. # "-sun"), then you have to tell the case statement up towards the top
  787. # that MANUFACTURER isn't an operating system.  Otherwise, code above
  788. # will signal an error saying that MANUFACTURER isn't an operating
  789. # system, and we'll never get to this point.
  790.  
  791. case $basic_machine in
  792.     *-acorn)
  793.         os=-riscix1.2
  794.         ;;
  795.     *-dec | vax-*)
  796.         os=-ultrix4.2
  797.         ;;
  798.     i386-sun)
  799.         os=-sunos4.0.2
  800.         ;;
  801.     m68000-sun)
  802.         os=-sunos3
  803.         # This also exists in the configure program, but was not the
  804.         # default.
  805.         # os=-sunos4
  806.         ;;
  807.     m68*-cisco)
  808.         os=-aout
  809.         ;;
  810.     mips*-cisco)
  811.         os=-elf
  812.         ;;
  813.     *-tti)    # must be before sparc entry or we get the wrong os.
  814.         os=-sysv3
  815.         ;;
  816.     sparc-* | *-sun)
  817.         os=-sunos4.1.1
  818.         ;;
  819.     *-ibm)
  820.         os=-aix
  821.         ;;
  822.     *-hp)
  823.         os=-hpux
  824.         ;;
  825.     *-hitachi)
  826.         os=-hiux
  827.         ;;
  828.     i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  829.         os=-sysv
  830.         ;;
  831.     *-cbm)
  832.         os=-amigados
  833.         ;;
  834.     *-dg)
  835.         os=-dgux
  836.         ;;
  837.     *-dolphin)
  838.         os=-sysv3
  839.         ;;
  840.     m88k-omron*)
  841.         os=-luna
  842.         ;;
  843.     *-sequent)
  844.         os=-bsd
  845.         ;;
  846.     *-crds)
  847.         os=-unos
  848.         ;;
  849.     *-ns)
  850.         os=-genix
  851.         ;;
  852.     i370-*)
  853.         os=-mvs
  854.         ;;
  855.     *-next)
  856.         os=-bsd
  857.         ;;
  858.     i[34]86-*)
  859.         os=-sco3.2v2
  860.         ;;
  861.         *-gould)
  862.         os=-sysv
  863.         ;;
  864.         *-highlevel)
  865.         os=-bsd
  866.         ;;
  867.     *-encore)
  868.         os=-bsd
  869.         ;;
  870.         *-sgi)
  871.         os=-irix
  872.         ;;
  873.     *-masscomp)
  874.         os=-rtu
  875.         ;;
  876.     *-rom68k)                    # CYGNUS LOCAL
  877.         os=-coff
  878.         ;;
  879.     *-*bug)                        # CYGNUS LOCAL
  880.         os=-coff
  881.         ;;
  882.     *)
  883.         os=-none
  884.         ;;
  885. esac
  886. fi
  887.  
  888. # Here we handle the case where we know the os, and the CPU type, but not the
  889. # manufacturer.  We pick the logical manufacturer.
  890. vendor=unknown
  891. case $basic_machine in
  892.     *-unknown)
  893.         case $os in
  894.             -riscix*)
  895.                 vendor=acorn
  896.                 ;;
  897.             -sunos*)
  898.                 vendor=sun
  899.                 ;;
  900.             -bosx*)            # CYGNUS LOCAL
  901.                 vendor=bull
  902.                 ;;
  903.             -lynxos*)
  904.                 vendor=lynx
  905.                 ;;
  906.             -aix*)
  907.                 vendor=ibm
  908.                 ;;
  909.             -hpux*)
  910.                 vendor=hp
  911.                 ;;
  912.             -hiux*)
  913.                 vendor=hitachi
  914.                 ;;
  915.             -unos*)
  916.                 vendor=crds
  917.                 ;;
  918.             -dgux*)
  919.                 vendor=dg
  920.                 ;;
  921.             -luna*)
  922.                 vendor=omron
  923.                 ;;
  924.             -genix*)
  925.                 vendor=ns
  926.                 ;;
  927.             -mvs*)
  928.                 vendor=ibm
  929.                 ;;
  930.             -vxworks*)
  931.                 vendor=wrs        # CYGNUS LOCAL
  932.                 ;;
  933.             -hms*)                # CYGNUS LOCAL
  934.                 vendor=hitachi
  935.                 ;;
  936.         esac
  937.         basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  938.         ;;
  939. esac
  940.  
  941. echo $basic_machine$os
  942.